package com.wasion.pwportable.protocol.analyzer.indicator;

import com.wasion.pwportable.protocol.analyzer.AbstractAnalyzer;

/**
 * 
 * @ClassName: Zero_Current_Params_RD_Analyzer
 * @Description: 4C/4D. 电缆故障指示器零序电流校表参数
 * @author 高意
 * @date 2014-9-11 上午8:44:28
 * 
 */
public class Zero_Current_Params_RD_Analyzer extends AbstractAnalyzer {

	@Override
	public void dataAnalysis(String ackBS) {

		String paramsData = ackBS.substring(DATABITSTART, DATABITSTART + 16);

		int params[] = new int[4];

		int j = 0;
		for (int i = 0; i < 4; i++) {

			String data = paramsData.substring(j, j + 4);
			String param = data.substring(2, 4) + data.substring(0, 2);

			params[i] = Integer.parseInt(param, 16);

			j = j + 4;
		}
		result.setZeroCurrentParams(params);
	}
}
